package PSS;

public class Test {
    /*public static void main(String[] args) {
        Dog dog=new Dog();
        System.out.println(dog.name);
        System.out.println(dog.age);
        dog.bark();
        dog.eat();
        dog.sleep();
    }*/
   /* public static void main(String[] args) {
        Derived d=new Derived();
    }*/
/*    class  Tire{
        //..
    }
    class  engine{
        //..
    }
    class  veh{
        //..
    }
    class car{
        private Tire tire;
        private engine engine;
        private veh veh;
    }
    class benz extends car{

    }*/
   /* public static void eat(Animal a){
        a.eat();
        a.sleep();

    }

    public static void main(String[] args) {
        Cat cat=new Cat("小黄",22);
        Dog dog=new Dog("小白",11);
        eat(cat);
        eat(dog);


    }*/
    public static void main(String[] args) {
        Animal animal=new Cat("元宝",22);
        Dog dog=new Dog("小白",31);
        dog.sleep();
        dog.eat();
        animal.eat();
    }


}
